package com.zmj.sy.mom.srv.aps.bean.vo.base;

/**
 * 枚举了一些常用API操作码
 * Created by macro on 2019/4/19.
 * @author pxd
 */
public enum ResultCode {
    SUCCESS(0, "操作成功"),
    ERROR(1, "请求失败"),
    FAILED(500, "系统发生异常，请联系管理员！"),
    NOT_LOGIN(400, " 没有登录"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    SYS_ERROR(402, "系统错误"),
    PARAMS_ERROR(403, " 参数错误"),
    INVALID_AUTHCODE(404, " AuthCode错误"),
    FORBIDDEN(405, "没有相关权限"),
    VALIDATE_FAILED(406, "参数检验失败"),
    SERVICE_TIME_OUT(407, "服务调用超时！"),
    NOT_SUPPORTED(410, "不支持或已经废弃"),
    TOO_FREQUENT (445, " 太频繁的调用"),
    UNKNOWN_ERROR (499, " 未知的错误 "),
    /**
     * 参数过大
     */
    PARMETER_BIG_EXCEPTION(102, "输入的图片数量不能超过50张!"),

    FAIL(500, "内部服务器错误"),
    /****/


    //---流程---
    FLOW_HANDLE_EXCEPTION(6, "流程办理错误, 请联系管理员");;
    private Integer code;
    private String message;

    private ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
